﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Microhard.Permission.Interface;
using Microhard.WarehouseInsp.Buz.Models;
using Microhard.WarehouseInsp.Buz.Interfaces;
using Microsoft.Practices.Unity;
using Microhard.Permission.MVCFilter;
using Microhard.Core.DBUtility;
using Microhard.WebUI.Models;
using Telerik.Web.Mvc;
using FluentValidation.Mvc;
using Microhard.WarehouseInsp.Buz.Impls;

namespace Microhard.WarehouseInsp.WebUI.Areas.WarehouseInsp.Controllers
{
    public class PlgChangePriceController : MicroHardBaseController<PledgeChangeRecordModel>
    {
        private IChangePlgPrice _resp = null;
        [Dependency]
        public IChangePlgPrice Prj
        {
            set
            {
                base._repository = _resp = value;
            }
            get
            {
                return _resp;
            }

        }

        [MVCFilterAtrForCustomeDataPermission(typeof(ChangePlgPriceScope), DataScopeactionParameterName = "scope", Order = 3)]//数据权限验证
        public override ActionResult Update(Guid identity, ScopeResult scope)
        {
            return base.Update(identity, scope);
        }

        [MVCFilterAtrForCustomeDataPermission(typeof(ChangePlgPriceScope), DataScopeactionParameterName = "scope", Order = 3)]//数据权限验证
        public override ActionResult SaveUpdate(PledgeChangeRecordModel model, ScopeResult scope)
        {
            return base.SaveUpdate(model, scope);
        }
    }
}
